package util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class MyRegex {
	public static String getStringByPattern(String srcStr, String pattern){
		String matchStr = "";
		
		Pattern p = Pattern.compile(pattern);
		Matcher m = p.matcher(srcStr);
		if (m.find()) {
			matchStr = m.group();
		} else {
//			System.out.println("No match string for pattern: "+ pattern + " in input string: "+srcStr);
		}
		return matchStr;
	}
}
